<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>登录</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<!--标准mui.css-->
		<link href="css/mui.min.css" rel="stylesheet" />
		<!--App自定义的css-->
		<link rel="stylesheet" href="css/register.css" />
		<link rel="stylesheet" href="css/login.css" />
		<!--App默认样式-->
		<link rel="stylesheet" href="css/default.css" />
		<!--引人jquery-->
		<script type="text/javascript" src="js/jquery-2.1.0.js" ></script>
		<script type="text/javascript" src="js/jquery.params.js" ></script>
		<script type="text/javascript" src="js/nav.js"></script>
	</head>

	<body>
		<!--log-->
		<div class="regBanner">
			<img src="image/log.png" />
		</div>
		<!--头像-->
		<div class="head-img">
			<img />
			
		</div>
		<!--注册信息-->
		<div class="regTxet">
				<input type="number" placeholder="请输入手机号" class="regPhone"/>
				<input type="password" placeholder="请输入密码" class="regPwd"/>
				<p class="rgeTip">无法登录?<i class="reg">立即注册</i></p>
		</div>
		<!--注册按钮-->
		
		<button class="regBtn">
			登录
		</button>
	</div>
	  <!--快速登陆-->
	  <div class="login-text">
	  	快速登录
	  </div>
	  <!--登录方式-->
	  <div class="loginMode">
	  	<div class="mode-item">
	  		<img class="mode-item-img" src="icon/qq.png" />
	  	</div>
	  	<div class="mode-item">
	  		<img class="mode-item-img"  src="icon/wx.png" />
	  	</div>
	  	<div class="mode-item">
	  		<img class="mode-item-img"  src="icon/wl.png" />
	  	</div>
	  </div>
		   <!--展位-->         	
      <div class="sated"></div>
		<script src="js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init()
		</script>
		<script>

			$(document).ready(function(){
					$(".regBtn").click(function(){
						//注册账号
						var userNum = $.query.get('num') 
						var pwdValue = $('.regPwd').val();
						var regPhone = /^[1][3,4,5,7,8][0-9]{9}$/;
						var phoneValue = $('.regPhone').val();
						if(phoneValue == ""){
							mui.toast('请填写你的手机号！')
						} else if(!regPhone.test(phoneValue)){
							mui.toast('手机号格式不正确！')
						} else if(userNum == ""){
							mui.toast('账号不存在！')
						}else if(phoneValue!=userNum){
							mui.toast('账号不正确！')
						} else{
							if(pwdValue == ""){
								mui.toast('请输入你的密码！')
							} else{
								$(window).attr('location',"index.html");	
						    }
						}
						
					})
				})
		</script>
		<!--登录-->
		<script>
			//登录页面文字提示
			$(function(){
				 
			$('.regPhone').blur(function(){
				//手机号
					var userNum = $.query.get('num');
					var regPhone = /^[1][3,4,5,7,8][0-9]{9}$/;
                    var phoneValue = $(this).val();
                    if(phoneValue == ""){
                    	mui.toast('手机号不能为空!')
                    }else if(!regPhone.test(phoneValue)){
                    	mui.toast('手机格式不对！')
                    }else if(userNum ==""){
                    	mui.toast('账号不存在！')
                    }else if(phoneValue!=userNum){
                    	mui.toast('账号不正确！')
                    }
				});
		
				//验证码失去焦点
				$('.regPwd').blur(function(){
					var verValue = $(this).val();
					if(verValue == ""){
						mui.toast('请输入密码!')
					}
				});
				//立即注册
				$('.reg').click(function(){
					$(window).attr('location',"register.html");	
				})
			})
			
			
			</script>
	</body>

</html>